<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.CreateAnotacoesTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.CreateAnotacoesLabel_idAnotacoes}" for="idAnotacoes" />
                    <h:inputText id="idAnotacoes" value="#{anotacoesController.selected.idAnotacoes}" title="#{bundle.CreateAnotacoesTitle_idAnotacoes}" required="true" requiredMessage="#{bundle.CreateAnotacoesRequiredMessage_idAnotacoes}"/>
                    <h:outputLabel value="#{bundle.CreateAnotacoesLabel_informacao}" for="informacao" />
                    <h:inputText id="informacao" value="#{anotacoesController.selected.informacao}" title="#{bundle.CreateAnotacoesTitle_informacao}" required="true" requiredMessage="#{bundle.CreateAnotacoesRequiredMessage_informacao}"/>
                    <h:outputLabel value="#{bundle.CreateAnotacoesLabel_fkUsuario}" for="fkUsuario" />
                    <h:selectOneMenu id="fkUsuario" value="#{anotacoesController.selected.fkUsuario}" title="#{bundle.CreateAnotacoesTitle_fkUsuario}" required="true" requiredMessage="#{bundle.CreateAnotacoesRequiredMessage_fkUsuario}">
                        <f:selectItems value="#{usuarioController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                    <h:outputLabel value="#{bundle.CreateAnotacoesLabel_fkObra}" for="fkObra" />
                    <h:selectOneMenu id="fkObra" value="#{anotacoesController.selected.fkObra}" title="#{bundle.CreateAnotacoesTitle_fkObra}" required="true" requiredMessage="#{bundle.CreateAnotacoesRequiredMessage_fkObra}">
                        <f:selectItems value="#{projetoController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                    <h:outputLabel value="#{bundle.CreateAnotacoesLabel_date}" for="date" />
                    <h:inputText id="date" value="#{anotacoesController.selected.date}" title="#{bundle.CreateAnotacoesTitle_date}" required="true" requiredMessage="#{bundle.CreateAnotacoesRequiredMessage_date}">
                        <f:convertDateTime pattern="MM/dd/yyyy" />
                    </h:inputText>
                </h:panelGrid>
                <br />
                <h:commandLink action="#{anotacoesController.create}" value="#{bundle.CreateAnotacoesSaveLink}" />
                <br />
                <br />
                <h:commandLink action="#{anotacoesController.prepareList}" value="#{bundle.CreateAnotacoesShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:commandLink value="#{bundle.CreateAnotacoesIndexLink}" action="/index" immediate="true" />
            </h:form>
        </ui:define>
    </ui:composition>

</html>
